package com.demo.base;

import org.springframework.beans.factory.annotation.*;
import org.springframework.stereotype.*;

/**
 * AIKA
 * 单纯获取ServiceFactory对象,防止循环依赖
 */


@Component
public class MyFactory {

    @Autowired
    public BaseFactory factory;


    /**
     * 在每个service类下粘贴以下代码
     */
    @Autowired
    private MyFactory myFactory;

    public BaseFactory factory() {
        return myFactory.factory;
    }


}
